package com.example.touchtest;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.widget.FrameLayout;

public class MyActivity extends Activity {
	private String TAG=this.getClass().getSimpleName();
	private View view1;
	private View view2;
	private View view3;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		view1=findViewById(R.id.view1);
		view2=findViewById(R.id.view2);
		view3=findViewById(R.id.view3);
		setData();
	}
	private void setData(){
//		view3.scrollTo(0, 100);
		FrameLayout.LayoutParams p=(FrameLayout.LayoutParams)view3.getLayoutParams();
//		p.leftMargin=50;
//		view3.setOnTouchListener(new View.OnTouchListener() {
//			
//			@Override
//			public boolean onTouch(View v, MotionEvent event) {
//				// TODO Auto-generated method stub
//				
//				return false;
//			}
//		});
	}
	@Override
	public boolean onTouchEvent(MotionEvent event) {
		// TODO Auto-generated method stub
		Log.w(TAG, "onTouchEvent:"+ActionUtil.getActionType(event));
		return super.onTouchEvent(event);
	}

	@Override
	public boolean dispatchTouchEvent(MotionEvent ev) {
		// TODO Auto-generated method stub
		Log.w(TAG, "dispatchTouchEvent:"+ActionUtil.getActionType(ev));
		boolean result=super.dispatchTouchEvent(ev);
		return result;
	}
}
